<!-- 我的 – 反馈		feedback -->
<template>
	<view class="warps">
	<!-- 	<view class="p_t_20 p_l_32 fs28">
			<text class="bold">选择问题</text>
		</view> -->
<!-- 		<view class="feedback-wen">
			<view class="w90 f b c p_t_31">
				<view class="feedback-hui senter">
					<text class="fs24">问题1</text>
				</view>
				<view class="feedback-hui senter">
					<text class="fs24">问题2</text>
				</view>
				<view class="feedback-hui senter">
					<text class="fs24">问题3</text>
				</view>
				<view class="feedback-hui senter">
					<text class="fs24">问题4</text> 
				</view>
			</view>
		</view> -->
		<view class="p_t_20 p_l_32 fs28">
			<text class="bold">问题描述</text>
		</view>
		<view class="feedback-miao">
			<view class="ml20 mr20 pt20 ">
				<textarea class="fs24 wd100 mb20" style="height: 200rpx;" v-model="content" placeholder="请描述您反馈的问题"></textarea>
			</view>
		</view>
		<view class="p_t_20 p_l_32 fs28">
			<text class="bold">上传图片</text>
		</view>
		<view class=" p15 bg-fff">
			<u-upload ref="uUpload" max-count="3":show-progress="false" :action="action"  ></u-upload>
		</view>
<!-- 		<view class="p_t_50 p_l_32 fs28">
			<text class="bold">问题描述</text>
		</view>
		<view class="feedback-lianxi">
			<text class="fs22 hui">联系方式联系方式联系方式</text>
		</view> -->
		<view class="feedback-but ">
			<button type="default" style="font-size: 30rpx;" @click="onsub()">提交</button>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				action:this.$config.hosts+this.$config.UrlPostgetfile,
				content:''
			}
		},
		onLoad() {
				// 动态导航条文字
				uni.setNavigationBarTitle({
					title: '我要反馈'
				})
			},
		methods: {
			//提交
			onsub(){
				var that= this
				if(that.content == ''){
					this.$api.toast('请输入问题描述')
					return
				}
				this.$refs.uUpload.upload();
				var files = this.$refs.uUpload.lists;
				var imgs=[]
				for(var i=0 ; i<files.length;i++){
					imgs.push(files[i].response.data)
				}
				var json={
					content:that.content,
					imgs:JSON.stringify(imgs)
				}
				that.$http.post(that.$config.UrlPostfankui, json).then((res) => {
					if (res.status == 1) {
						this.$api.toast('反馈成功')
					}
				})
			}
		}
	}
</script>

<style scoped>
	.warps {
		height:100vh;
		overflow: hidden;
		background-color:#F6F8FC;
	}
	.feedback-wen{
		width: 750rpx;
		height: 102rpx;
		opacity: 1;
		background: #ffffff;
		margin-top:24rpx;
	}
	.feedback-hui{
		width: 152rpx;
		height: 46rpx;
		opacity: 1;
		background: #f5f5f5;
		border-radius: 24rpx;
	}
	.feedback-miao{
		width: 750rpx;
		opacity: 1;
		background: #ffffff;
		margin-top:24rpx;
		overflow:hidden;
	}
	.feedback-miao-xu{
		width: 152rpx;
		height: 152rpx;
		line-height:182rpx;
		opacity: 1;
		border: 2rpx dashed #cbcbcb;
		border-radius: 12rpx;
		margin-left:32rpx;
		margin-top:24rpx;
	}
	.feedback-lianxi{
		width: 750rpx;
		height: 66rpx;
		line-height:66rpx;
		opacity: 1;
		background: #ffffff;
		margin-top:24rpx;
		padding-left:32rpx;
	}
	.feedback-but{
		margin-top:268rpx;
	}
	.feedback-but>button{
		width: 686rpx;
		height: 72rpx;
		line-height:72rpx;
		opacity: 1;
		background: #1f73f2;
		border-radius: 12rpx;
		font-size: 24rpx;
		color: #ffffff;
	}
</style>
